- Cursor Jupyter Notebook MCP Server
Cursor Jupyter Notebook MCP Server
Jupyter Notebook MCP Server (for Cursor)
This directory contains a Model Context Protocol (MCP) server designed to allow AI agents within Cursor to interact with Jupyter Notebook (.ipynb) files. It was created to overcome a limitation with Cursor. As of version 0.48.9, in Agent mode, the model could not edit notebooks or notebook cells in response to dialog in the AI chat pane. This provides the agent with a suite of MCP tools that allow direct notebook cell manipulation.
I'm sure at some point this will be handled natively by Cursor, but I have a data science background, and I live in Jupyter notebooks. I got tired of copy/paste-ing output of the chat manually into the notebook cells.
Although designed to overcome a limitation with Cursor, this MCP server does not have anything specific to Cursor other than the configuration instructions. You could easily configure this for use with Claude Code or any model/agent that can take advantage of MCP.
This MCP server uses the nbformat library to safely manipulate notebook structures and enforces security by restricting operations to user-defined directories. It also uses nbconvert to enable exporting notebooks to various formats like Python scripts, HTML, and more. The server handles all notebook operations through a clean API that maintains notebook integrity and prevents malformed changes.
Video Walkthrough
Cursor Jupyter Notebook MCP Server (YouTube) walks through:
- The current limitations of editing notebooks directly in Cursor.
- Installing and configuring the Notebook MCP Server.
- Creating a notebook from scratch (example shown: Singular Value Decomposition tutorial in less than 2 minutes).
- Demonstrating various editing tools (edit, split, duplicate cells).
- Reading notebook metadata.
- Exporting notebooks to python
